package com.seantone.inappupdate.core.utils;
import android.content.Context;
import android.os.Build;

public class Utils {
    static public boolean verifyInstallerId(Context context, String packageName){
        try {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
                return  context.getPackageManager().getInstallSourceInfo(packageName) != null;
            } else {
               return  context.getPackageManager().getInstallerPackageName(packageName) != null;
            }
        }catch (Exception e){
            return false;
        }
    }
}
